home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / Open Me for REALbasic 3 / REALbasic 3.2 / Made with REALbasic™ / Hardware & System Utilities / SaveIt / SaveIt Readme < prev   
Text File  |  1998-09-13  |  11KB  |  108 lines

  1.  
  2.                                          SaveIt
  3.  
  4.                                                     Steve W. Jackson
  5.                                              sjacksn@mindspring.com
  6.  
  7.  
  8. This is a utility program I built with REALbasic.  When I acquired a new G3/266, I chose to leave my trusty Zip drive connected to my older Mac.  As a result, I lost the use of a handy utility provided by Iomega called Personal Backup.  So I decided to develop this little program to help me back up selected important folders to the Zip via network.  The result is SaveIt.
  9.  
  10. How SaveIt Works
  11.  
  12. If you're familiar with Personal Backup, you'll already have something of an idea how SaveIt operates.  But here's an overview.  First, let's look at each of its menus, where most of this information can be covered.
  13.  
  14. THE MENUS
  15.  
  16. About
  17.  
  18. As you might expect, this is where I get a chance to toot my own horn.  It will always reflect the current version and advertise for REALbasic.
  19.  
  20. File
  21.  
  22. This is where you can select New Save Set, Edit Save Set, Delete Save Set, or Quit.
  23.  
  24. File->New Save Set
  25.  
  26. When you select this option, you'll be presented with a dialog where you can select the Source and Destination folders.  Naturally, they must be online and available in order to select them.  Once you've OK'd them (and they must be different), they'll appear in your "Save Sets" window.  You'll notice that they show "Never Used" where other Save Sets show the last date used.  Any time you make a change to a Save Set, including executing one, the changes will be saved in a file over in the Preferences folder inside your System Folder.  A folder named SaveIt Sets will be created in the Preferences folder, and each Save Set will have its own file.  If you wish to delete a Save Set while not running SaveIt, you can simply delete its file.  Filenames begin with "ss" (short for SaveIt Save Set), and will have the year, month, day, hour and minute at the time they're saved.  For example, if you create a new Save Set and then quit SaveIt, and the date/time is September 10, 1998, at 7:30:10 PM, your file will be named "ss19980910193010."  The filename will not be changed unless you delete and then recreate the Save Set.
  27.  
  28. File->Edit Save Set
  29.  
  30. This menu item will only be available if you have selected one of the Save Sets in the main window.  When selected, it will present you with a dialog just like that used for creating new Save Sets, showing the currently selected folders' paths and allowing you to change either or both.  SaveIt doesn't implement any form of Undo, so once you OK this dialog, the changes are permanent.  This same functionality can be accessed via the Edit button in the main window.
  31.  
  32. File->Delete Save Set
  33.  
  34. This menu option (also only available when a Save Set is selected in the main window) will allow you to delete any Save Set.  You'll be prompted to confirm before the delete is done, since this action cannot be undone.  If the Save Set has been associated with a file (as described above), the file will be deleted on your confirmation.
  35.  
  36. File->Quit
  37.  
  38. This option quits SaveIt and causes any Save Set files to be updated or created.  In the event that you create or edit Save Sets and SaveIt does not quit normally (say a force quit, or a system crash), the changes to files will be lost.
  39.  
  40. Edit
  41.  
  42. No features of the Edit menu are supported in Hangman.
  43.  
  44. Help
  45.  
  46. This menu is a Macintosh standard, not provided by me.
  47.  
  48.  
  49. THE MAIN WINDOW
  50.  
  51. This is your primary interface to SaveIt.  It consists of a scrollable list of Save Sets, a Run button, and an Edit button.
  52.  
  53. The Run Button
  54.  
  55. When you've selected any Save Set in the list, SaveIt will automatically check to determine whether the folders (or volumes) pointed to are present.  If so, the Run button becomes active; otherwise it remains unavailable.  So if you chose a Zip disk or floppy and it's currently not mounted, this will occur.  You'll see the same behavior if either source or destination is an actual folder and cannot be found.  If you re-create the appropriate folder, you can unselect and then reselect the item to activate the Run button.  You can also execute any Save Set by double-clicking on it in the list.  If you do, SaveIt will inform you if either folder is unavailable.
  56.  
  57. The Edit Button
  58.  
  59. This button will only be active if you have selected a Save Set in the list.  It will be activated under the same conditions that activate the File->Edit Save Set menu item.  You can edit a Save Set even if one of its folders isn't available.  But if you do make changes, the selected folders or volumes must be available.
  60.  
  61. The Save Sets List
  62.  
  63. As I described earlier, each Save Set you've created will have an entry in this list.  Each one is read from a single file in the SaveIt Save Sets folder in your Preferences folder.  There are three items in the list for each Save Set:  the source folder's name, the destination folder's name, and the date/time this Save Set was last used.  You'll only see the folder names in the list, but SaveIt actually stores the complete pathname to each folder.
  64.  
  65. Running (or Executing) a Save Set
  66.  
  67. When you click the Run button, or double-click a Save Set, it will be "executed."  This means that its backup actions will be carried out.  Here's how it works.
  68.  
  69. Step 1.
  70.  
  71. First, SaveIt will look at all the items in your destination folder.  Each one will be checked to see if it exists in the source folder.  Any that do not exist will be removed.  Note that special care has been taken to ensure that this doesn't destroy any floppies or other volumes.  That is, the Desktop file, Desktop Folder, Trash folder, and other "special" items at the root level of a volume aren't touched.  Any items that are removed will NOT be moved to the Trash, but will be deleted.  This can only be undone with a data/file retrieval program, such as Norton's Unerase.  If any item to be deleted is a folder, its entire contents will be deleted in the same fashion.
  72.  
  73. Step 2.
  74.  
  75. Second, SaveIt will look at all the items in your source folder.  For each one, it will look for an equivalent in the destination folder.  If none is found, it will be copied (folders will be copied over in their entirety in this situation).  If one is found, it will be replaced only if the one in your source folder is newer.
  76.  
  77. Special Steps.
  78.  
  79. In the process of deleting any items from the destination folder which no longer belong there, or copying outdated items, SaveIt will check each to determine whether they are locked.  For each such locked file, you'll be presented with a confirmation dialog asking whether to delete/replace the locked file.
  80.  
  81.  
  82. KNOWN PROBLEMS AND INCOMPATIBILITIES
  83.  
  84. There aren't any known incompatibilities between SaveIt and any other software or hardware.  But there are a few minor quirks I should mention.
  85.  
  86. The biggest of these is aliases.  Because of the way REALbasic handles aliases, you might have problems if there are aliases in either your source or destination folder.  Any time that SaveIt encounters an alias, it automatically resolves it to its original file/folder.  That means aliases found (in Step 1 as described above) in the destination folder but not in the source folder will cause the ORIGINAL file to be found and deleted!  If the alias is to a folder, the ORIGINAL folder will be found and its complete contents removed!  Then, during Step 2, each item in the source folder will be similarly evaluated.  If any file or folder is an alias, its original will be copied to the destination.  Unfortunately, this is how REALbasic handles aliases, so it's not something I can fix.  There are plans in a future version (a professional release due out sometime in 1999) to let programs identify aliases and choose whether or not to resolve them.  If and when I decide that SaveIt has received wide enough interest to make such a correction, I'll buy the upgrade to REALbasic and correct this problem.
  87.  
  88. The only other quirk presently known is with being unable to detect a full disk.  In my testing, I intentionally overfilled a floppy.  SaveIt doesn't produce any kind of error message when a disk full situation is encountered.  While not yet confirmed, I suspect that this too is part of how REALbasic handles files.  If and when I discover a way to correct this, I will do so immediately.
  89.  
  90. One last thing:  I haven't actually encountered this potential problem, but I have thought about it and feel it fair to let you in on it.  We programmers know about something called "the stack" used in our programs.  It's a way for programs to keep up with where they are when one part of a program calls another.  It occurs to me that there is the possibility of a Stack Overflow Exception if your source folder happens to be VERY deep and have lots of subfolders.  I didn't take time to create a situation like this to see if it happens, but it seems possible under such circumstances.  If it SHOULD occur, I'd like to make a special request of you.  If possible, try and provide me a detailed listing of the folder hierarchy.  Then, try increasing SaveIt's memory allocation and see if it resolves the problem (or allows it to continue further).
  91.  
  92. LEGAL STUFF
  93.  
  94. This program is "Feedback-Ware" -- I did it because I needed it and to continue learning the wonders of REALbasic.  I retain copyrights to the program, but you can use it to your heart's content and give it to everyone you know.  I'm not asking for any money or other valuables, not even the postage for a postcard.  I simply ask that you try it out and send me feedback.  Send me an email, tell me you found SaveIt, tell me when, where, what version, and tell me what you think of it.  How do you think I could make it better?  Did you find a bug?
  95.  
  96. That's it -- just your feedback, good or bad.  And tell others about it if you like it.  Or let me know what other games, utilities, or useful goodies you think would be interesting so that I can have more ideas for developing (more) useful Mac programs with REALbasic.
  97.  
  98. This is the second program I developed with REALbasic.  The first was a rather addictive (if I do say so myself) game of Hangman.  Like SaveIt, Hangman will usually be available at my FTP site.
  99.  
  100. Speaking of my FTP site, I haven't gone formal or anything and though up a snazzy "software company" name for myself.  I'm a professional programmer by day, but the Mac stuff I do just for me.  (Perhaps someday I'll be able to do Mac programming for a living.)  So my personal FTP site (provided by my outstanding ISP) is at <ftp://ftp.mindspring.com/users/sjacksn>.
  101.  
  102. = Steve =
  103. sjacksn@mindspring.com
  104.  
  105. Version History
  106.  
  107. 1.0  -- 13 September 1998 -- Initial release of SaveIt
  108.